import React from "react";
import { Swiper, Tabs, NavBar } from "antd-mobile";
import { useNavigate } from "react-router-dom";
const Login = () => {
  const navigate = useNavigate()
  return (
    <div>
      <NavBar>
        <span onClick={() => navigate('/city')}>{ localStorage.getItem('city') || "北京" }</span>
      </NavBar>
      <Tabs>
        <Tabs.Tab title="火车票" key={1}>
          <Swiper>
            <Swiper.Item>
              <img src="/public/vite.svg" alt="" style={{ height: 200 }} />
            </Swiper.Item>
            <Swiper.Item>
              <img src="/public/vite.svg" alt="" style={{ height: 200 }} />
            </Swiper.Item>
            <Swiper.Item>
              <img src="/public/vite.svg" alt="" style={{ height: 200 }} />
            </Swiper.Item>
          </Swiper>
        </Tabs.Tab>
        <Tabs.Tab title="汽车票" key={2}></Tabs.Tab>
        <Tabs.Tab title="飞机票" key={3}></Tabs.Tab>
      </Tabs>
    </div>
  );
};

export default Login;
